package pkg

import (
	"bytes"
	"encoding/json"
	"goods_srv/types"
	"net/http"
)

func GoodsListEs() {

	var goodsList types.Goods

	marshal, err := json.Marshal(goodsList)
	if err != nil {
		return
	}

	request, err := http.NewRequest("POST", "http://113.44.72.167:5601/goods/_search", bytes.NewBuffer(marshal))
	if err != nil {
		return
	}

	request.Header.Set("Content-Type", "application/json")

	client := &http.Client{}

	response, err := client.Do(request)

	if err != nil {
		return
	}

	defer response.Body.Close()

}
